FROM python:3.7-alpine

MAINTAINER yangyuhang@qq.com

RUN echo "http://mirrors.aliyun.com/alpine/v3.11/main" > /etc/apk/repositories && \
    echo "http://mirrors.aliyun.com/alpine/v3.11/community" >> /etc/apk/repositories

RUN apk update && \
    apk add --no-cache gcc g++ python python-dev py-pip mysql-dev linux-headers libffi-dev openssl-dev

RUN pip install devpi-server devpi-web devpi-client -i https://mirrors.aliyun.com/pypi/simple/ && \
    mkdir /devpi

EXPOSE 3141
ADD run.sh /
CMD ["/bin/sh","run.sh"]
